/**
 * 创建和ZY_EXT.store联动的
 */
export class StoreManCls {
  constructor(storeName) {
    // super();
    this.storeName = storeName
    this.private_map = new Map()
  }
  async init() {
    let v = await ZY_EXT.store.getItem(this.storeName)
    if (v) {
      this.private_map  = v
    }
    return;
  }
  async setItem(key, value) {
    this.private_map.set(key, value)
    await ZY_EXT.store.setItem(this.storeName, this.private_map)
  }
  async getItem(key) {
    return this.private_map.get(key)
  }
}
